package com.operate.api.operate.stat.controller;

import cn.dev33.satoken.annotation.SaCheckLogin;
import com.github.pagehelper.PageInfo;
import com.operate.api.base.*;
import com.operate.api.operate.banner.domain.vo.BannerAddVO;
import com.operate.api.operate.banner.domain.vo.BannerSearchVO;
import com.operate.api.operate.banner.domain.vo.BannerUpdateVO;
import com.operate.api.operate.banner.domain.vo.BannerVO;
import com.operate.api.operate.banner.service.IBannerService;
import com.operate.api.operate.dramas.domain.vo.VideoSearchVO;
import com.operate.api.operate.dramas.domain.vo.VideoVO;
import com.operate.api.operate.stat.domain.vo.StatSearchVO;
import com.operate.api.operate.stat.domain.vo.StatVO;
import com.operate.api.operate.stat.service.IStatService;
import com.operate.util.BindingResultUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;
import java.util.List;

@Api( tags = ApiIndex.StatController)
@RequestMapping(value = "/api/operate/stat")
@RestController
@SaCheckLogin
public class StatController {


    @Autowired
    private IStatService service;


    @ApiOperation(value = "查询列表")
    @GetMapping(value = "/list")
    public R<RestPage<List<StatVO>>> list(
            @ApiParam(value = "查询参数") @ModelAttribute StatSearchVO searchVO) {
        List<StatVO> list = service.getList(searchVO);
        RestPage restPage = new RestPage( new PageInfo(list),list);
        return new R(restPage);
    }



}
